QWe are writing a screen saver that plays QuickTime movies. Our
WaitNextEvent
loop and code is very basic. We have noticed that other
background applications don't get any time, even if we use
WaitNextEvent
and make sure MoviesTask
does not spend too
much time playing the movie. However, if we add code to track the
updateEvents
with BeginUpdate
and EndUpdate
the
problem is gone. Why?
AQuickTime and other parts are sending update events to your application. If these update events are not handled, they are resent, resulting in no time yield to other applications.
By calling BeginUpdate/EndUpdate
or otherwise taking care of the
update event inside your WaitNextEventLoop
, you allow yielding to
other applications.
See Technote TB 37 Pending Update Perils, which discusses this situation.